package com.bicon.im.service.processor.rpc.handler;

import com.bicon.im.service.processor.rpc.fallback.ThirdPartFallback;
import com.bicon.im.service.processor.service.ThirdPartService;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * Created by L on 2017/2/13.
 */
@FeignClient(name ="thirdPartRpc",fallback = ThirdPartFallback.class)
public interface ThirdPartRpc extends ThirdPartService {

    /**
     * 发送短信验证码的接口
     *
     * @param content          短信的内容，配合模板一起使用
     * @param phone            要发送的电话
     * @return
     */
    @RequestMapping(value = "/V1.0.0/sendYunSms",method = RequestMethod.POST)
    String sendYunSms(@RequestParam(value = "phone") String phone,
                      @RequestParam(value = "content") String content,
                      @RequestParam(value = "type", required = false) String type);




    @RequestMapping(method = RequestMethod.POST, value= "/V1.0.0/jpush/pushAllTargetByUser")
    String pushAllTargetByUser(@RequestParam(value = "notification_title") String notification_title,
                               @RequestParam(value = "title") String title,
                               @RequestParam Map<String, String> map,
                               @RequestParam(value = "alias") String[] alias, @RequestParam(value = "appkey") String appkey, @RequestParam(value = "mastersecret") String mastersecret);


    @RequestMapping(method = RequestMethod.POST, value= "/V1.0.0/api/Attention/selectOneAttention")
    String selectOneAttention(@RequestParam(value = "userId") String userId, @RequestParam(value = "productId") String productId, @RequestParam(value = "token") String token);
}
